package com.yueka.service;

import org.dromara.x.file.storage.core.FileInfo;
import org.dromara.x.file.storage.core.presigned.GeneratePresignedUrlResult;
import org.springframework.web.multipart.MultipartFile;

public interface AliOssService {
    /**
     * 上传文件并返回访问地址
     */
    String uploadFile(MultipartFile file) throws Exception;

    /**
     * 客户端上传
     */
    GeneratePresignedUrlResult clientUpload();

    String getSignUrl(String url);

    /**
     * 根据Uri获取FileInfo
     *
     * @param uri
     * @return
     */
    FileInfo getFileInfoByUri(String uri);
    
    String preSign(String uri);
}
